Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing for most of the AST module #12633

Merged
merged 4 commits into from
Jan 9, 2024

Conversation

dcbaker
Copy link
Member

@dcbaker dcbaker commented Dec 14, 2023

What remains is more complicated because of layering violations that will be difficult to fix

mesonbuild/ast/printer.py Fixed Show fixed Hide fixed
mesonbuild/ast/printer.py Outdated Show resolved Hide resolved
run_mypy.py Show resolved Hide resolved
@dcbaker dcbaker force-pushed the submit/type-fix-most-of-ast branch from 35feedc to 641ea7d Compare January 8, 2024 17:49
@dcbaker dcbaker added this to the 1.4.0 milestone Jan 8, 2024
@@ -270,7 +271,7 @@ def traverse_nodes(inqueue: T.List[BaseNode]) -> T.List[BaseNode]:
empty_sources: T.List[T.Any] = []
# Passing the unresolved sources list causes errors
kwargs_reduced['_allow_no_sources'] = True
target = targetclass(name, self.subdir, self.subproject, for_machine, empty_sources, [], objects,
target = targetclass(name, self.subdir, self.subproject, for_machine, empty_sources, None, objects,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh fun... if self.structured_sources and an empty list is falsey.

@eli-schwartz eli-schwartz merged commit c41fbf5 into mesonbuild:master Jan 9, 2024
34 checks passed
@dcbaker dcbaker deleted the submit/type-fix-most-of-ast branch January 9, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants